package nl.scalasim
package actors
package citizenactivities

import scala.actors.Actor
import nl.scalasim.actors.traits.SimulationActor

/**
 * Activity for an actor that is moving between home and workplace
 *
 * @author Yigal Duppen
 * @since Oct 28, 2010
 */
class CommutingActivity(val citizen: Citizen) extends Activity {

  var nextActivity: Activity = _

  def activate = {
  }

  override def handleArrived(target: SimulationActor) {
    log.info(citizen + " arrived at " + target + ", starting on " + nextActivity)
    citizen.currentActivity = nextActivity
  }


  def handleAct = {
    done()
  }

}


